diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py
index 75a3b8b030..ee6decc3e3 100644
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -373,8 +373,8 @@ class RenameModel(ModelOperation):
             old_model = from_state.apps.get_model(app_label, self.old_name)
             old_db_table = old_model._meta.db_table
             new_db_table = new_model._meta.db_table
-            # Don't alter when a table name is not changed.
-            if old_db_table == new_db_table:
+            # Don't alter when a table name is not changed or db_table is explicitly set.
+            if old_db_table == new_db_table or old_model._meta.managed is False:
                 return
             # Move the main table
             schema_editor.alter_db_table(new_model, old_db_table, new_db_table)
